#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "rtp.h"

void rtp_data(void*data, int len, void* usr_data)
{
    printf("rtp pack data len:%d\n", len);
}

int main() {
    char* data = "1234567890";
    struct rtp_packetizer* packet = create_rtp_packetizer(RTP_H264, 0x12345678, rtp_data, data);
    int len = 512 * 1024;
    uint32_t pts = 0;
    char* Iframe = malloc(len);
    if (Iframe == NULL) return -1;
    memset(Iframe, 0x12, len);
    rtp_payload_encode_input(packet, Iframe, len, pts);
    printf("end packet, seq: %d\n", packet->seq);
    rtp_packetizer_destroy(packet);
    return 0;
}